﻿if exists (select 1
            from  sysobjects
           where  id = object_id('t_product_promote')
            and   type = 'U')
   drop table t_product_promote
go

/*==============================================================*/
/* Table: t_product_promote                                     */
/*==============================================================*/
create table t_product_promote (
   id                   bigint               identity,
   created_time         datetime             not null,
   created_by           bigint               not null,
   last_updated_time    datetime             null,
   last_updated_by      bigint               null,
   product_id           varchar(16)          null,
   promote_date         datetime             null,
   order_num            int                  null,
   pv_num               int                  null,
   promoter_num         int                  null,
   constraint PK_T_PRODUCT_PROMOTE primary key (id)
)
go

if exists (select 1 from  sys.extended_properties
           where major_id = object_id('t_product_promote') and minor_id = 0)
begin 
   declare @CurrentUser sysname 
select @CurrentUser = user_name() 
execute sp_dropextendedproperty 'MS_Description',  
   'user', @CurrentUser, 'table', 't_product_promote' 
 
end 


select @CurrentUser = user_name() 
execute sp_addextendedproperty 'MS_Description',  
   '商品推广数据表', 
   'user', @CurrentUser, 'table', 't_product_promote'
go
